import { request } from "./http.js";
import qs from 'qs'
export function getlogin(data) {
    return request({
    method:'post',
    url:'/login',
    data:data
    })
  }
  export function getstudents(params) {
    return request({
      method:'get',
    url:'/students',
    params
    })
  }
  export function deletstudents(id){
    return request({
      method:'delete',
      url:`/students/${id}`,
      })
  }
  // 增信息列表
  export function info(data) {
    data = qs.stringify(data)
    return request({
      method:'post',
      url:'/info',
      data
    })
  } 
  // 信息列表查询接口
  export function getInfo() {
    return request({
      method:'get',
      url:'/info',
    })
  }
   // 修改信息列表查询接口
   export function updatainfo(data) {
    data = qs.stringify(data)
    return request({
      method:'put',
      url:'/info',
      data
    })
  }
  // 删除
  export function deleteinfo(id) {
    return request({
      method:'delete',
      url:`/info/${id}`,
    })
  }
  export function dataview(){
    return request({
      method:'get',
      url:'/dataview'
    })
  }